﻿@using Smart.Project.Data
@model MRole
@{
    Layout = null;
}
<link href="~/Content/css/styles.css" rel="stylesheet" />
<link href="~/Content/css/styles-blue.css" rel="stylesheet" />
<link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/css/new-styles.css" rel="stylesheet" />
<link href="~/Content/js/vendors/jsPanel/jquery.jspanel.css" rel="stylesheet" />

<script src="~/Content/js/vendors/jquery/jquery.min.js"></script>
<script src="~/Content/js/vendors/jquery/jquery-ui.min.js"></script>
<script src="~/Content/js/vendors/bootstrap/bootstrap.min.js"></script>
<script src="~/Content/js/vendors/form/jquery.form.min.js"></script>
<script src="~/Content/js/vendors/form/jquery.validate.min.js"></script>
<script src="~/Content/js/vendors/slimScroll/jquery.slimscroll.min.js"></script>
<script src="~/Content/js/index.js"></script>
<script src="~/Content/js/vendors/jsPanel/jquery.jspanel.js"></script>
<script type="text/javascript">
    $(function () {
        $("#btnSave").click(function () {
            if ($("#mainForm").valid()) {
                $('#mainForm').ajaxSubmit(function (data) {
                    if (data == "true") {
                        parent.AlertInfo("添加成功！", "success");
                    } else if (data == "false") {
                        parent.AlertInfo("添加失败！", "error");
                    }
                    else {
                        parent.AlertInfo(data, "error");
                    }
                });
            }
        });
    });
</script>
<div class="powerwidget" data-widget-editbutton="false" style="margin-bottom:0px">
    <div class="inner-spacer">
        <div id="slimScroll">
            @using (Html.BeginForm("Create", "Role", FormMethod.Post, new { @class = "form-horizontal", @id = "mainForm", @style = "margin-bottom:0px" }))
            {
                <fieldset>
                    <div class="form-group">
                        <label class="col-md-2 control-label" for="textinput">角色名称</label>
                        <div class="col-md-10">
                            @Html.HiddenFor(item => item.Id)
                            @Html.TextBoxFor(item => item.ROLENAME, new { @class = "form-control required" })
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label" for="textinput">别名</label>
                        <div class="col-md-10">
                            @Html.TextBoxFor(item => item.BYNAME, new { @class = "form-control required" })
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label" for="textinput">描述</label>
                        <div class="col-md-10">
                            @Html.TextBoxFor(item => item.DEPICT, new { @class = "form-control required" })
                        </div>
                    </div>
                   
                    <div class="form-group">
                        <div class="col-md-12" style="text-align:center">
                            <button id="btnSave" type="button" class="btn btn-info">保存</button>
                        </div>
                    </div>
                </fieldset>
            }
        </div>
    </div>
</div>


